package com.android.djlmapp.adapter.kuandai;

import android.content.Context;
import android.view.View;

import com.android.djlmapp.R;
import com.android.djlmapp.model.kaika.SimNumInfo;

import org.refresh_view.pullrecyclerview.BaseRecyclerAdapter;
import org.refresh_view.pullrecyclerview.BaseViewHolder;

import java.util.ArrayList;

/**
 * 宽带SIM数据适配器
 */

public class KuanDaiSimNumAdapter extends BaseRecyclerAdapter<SimNumInfo.IccidListBean> {

    public KuanDaiSimNumAdapter(Context context) {
        super(context, R.layout.item_sim_num, new ArrayList<SimNumInfo.IccidListBean>());
    }

    @Override
    protected void convert(BaseViewHolder holder, SimNumInfo.IccidListBean item) {

        holder.setText(R.id.kd_sim, item.getNum());

        holder.setOnClickListener(R.id.ll_sim, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mOnItemClickListener.onItemClick(item);
            }
        });


    }


    public OnItemClickListener mOnItemClickListener;

    public interface OnItemClickListener {
        void onItemClick(SimNumInfo.IccidListBean item);
    }

    public void setOnItemClickListener(OnItemClickListener mOnItemClickLitener) {
        this.mOnItemClickListener = mOnItemClickLitener;
    }

}
